'''
Created on Apr 15, 2011

@author: yc30v1m
'''
import ConfigParser
import glob
from plugins.Log import Log

class FileParser(object):
    '''
    classdocs
    '''
    log = Log.getLogger("FileParser")

    def __init__(self, fileNames):
        """
        We can specify single file or Multiple Files
        """
    
    def getParser(self):
        return ConfigParser()
    
    def readFilesInFolder(self,folderPath, fileExt):
        files = glob.glob(folderPath + '*.' + fileExt)
        return self.parseFile(files)
    
    def parseFile(self,fileName):
        return ConfigParser().read(fileName)